package Day08_08;

public class Weapon {

}

class Gun extends Weapon implements Attackable{

    public void attack() {
        System.out.println("发射子弹.....");
    }
}

class Cannon extends Weapon implements Attackable ,Moveable{

    public void attack() {
        System.out.println("发射高炮弹，嘣....");
    }
    public void move(){
        System.out.println("瞄准敌方阵地，开炮.....");
    }
}

class Tank extends Weapon implements Attackable,Moveable{

    public void attack() {
        System.out.println("发射炮弹，嘣....");
    }
    public void move(){
        System.out.println("坦克向前推进，占领敌方阵地.....");
    }
}

class Bomber extends Weapon implements Attackable,Moveable{

    public void attack() {
        System.out.println("投放炸弹，嘣....");
    }
    public void move(){
        System.out.println("飞到敌军上方，摧毁敌方阵地.....");
    }
}

class Warship extends Weapon implements Attackable,Moveable{

    public void attack() {
        System.out.println("发射防空导弹，巡航导弹....");
    }
    public void move(){
        System.out.println("驶入海域，保卫领土.....");
    }
}
